﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sexybeauty.Core.Inf.Entities.Table;

namespace Sexybeauty.Core.Inf.LogicEntity
{
    public class MemberAccountEntity : IAccessible<MemberAccount,MemberAccountEntity>
    {
        #region Fileds
        public string UserName { get; set; }
        public decimal Balance { get; set; }
        public decimal Give { get; set; } 
        #endregion

        protected override void Covariant(MemberAccount dbModel)
        {
            this.UserName = dbModel.UserName;
            this.Balance=dbModel.Balance;
            this.Give = dbModel.Give;
        }
        protected override MemberAccount Inverter(MemberAccountEntity model)
        {
            return new MemberAccount()
            {
                Balance = model.Balance,
                Give = model.Give,
                UserName = model.UserName
            };
        }
    }
}
